﻿<!DOCTYPE html>
<html>
  <head>
    <title>注册信息审核</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="resources/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="resources/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="resources/data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="resources/files/注册信息审核_1/styles.css" type="text/css" rel="stylesheet"/>
    <script src="resources/resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
   <!-- <script src="resources/resources/scripts/prototypePre.js"></script>
    <script src="resources/data/document.js"></script>
    <script src="resources/resources/scripts/prototypePost.js"></script>
    <script src="resources/files/注册信息审核_1/data.js"></script>
    <script type="text/javascript">
      $axure.utils.getTransparentGifPath = function() { return 'resources/images/transparent.gif'; };
      $axure.utils.getOtherPath = function() { return 'resources/Other.html'; };
      $axure.utils.getReloadPath = function() { return 'resources/reload.html'; };
    </script>-->
    <style>
      #u2102,#u2101,#u2103,#u2096,#u2097,#u2098,#u2095,#u2099,#u2100{
        margin-top:16%;
        margin-left: 4%;
      }
    </style>
    <style>
      table tbody {
        display:block;
        /*height:195px;*/

      }
      table thead, tbody tr {
        display:table;
        width:100%;
        table-layout:fixed;
      }
      table thead {
        width: calc( 100%  );
      }
      body {text-align: center;}
      table {margin: auto;}
      table thead th{ background:#ccc;}
      tbody tr:nth-child(odd){
        background: #80b7cc;
      }

      .ax_default button{
        padding-left: 200px;
      }
    </style>
  </head>
<script>
    var b;
    $(function () {
        readList(1);
    })
  function readList(pageNum) {
      if(pageNum == 0){
          pageNum = 1;
      }
      var userPhone = $("input[name='userPhone']").val();
      var formData = new FormData();
      formData.append("pageNum",pageNum);
      formData.append("userPhone",userPhone);
      $.ajax({
          url:"/selectRegister",
          data:{"pageNum":pageNum,"userPhone":userPhone},
          type:"post",
          dataType:"json",
          success:function (data) {
              b = data;
              var fenye = "";
              var a = data.list;
              $("#table").empty();
              var zhaungtai = "";
              for(var i = 0; i < a.length;i++){
                  var s = a[i];
                  if(s.auditRegister == 1){
                      zhaungtai = "审核中";
                  }else if(s.auditRegister == 2){
                      zhaungtai = "审核通过";
                  }else if(s.auditRegister == 0){
                      zhaungtai = "未通过";
                  }
                  fenye +='<tr style="height: 60px;">'+
                          '<td style="width: 100px"><input class="danXuanKuang" onclick="" type="checkbox" value="'+s.id+'" ></td>'+
                          '<td>'+s.id+'</td>'+
                          '<td>'+s.userPhone+'</td>'+
                          '<td>'+s.userRegistrationTime+'</td>'+
                          '<td><a href="resources/zhucexiangqing.html?id='+s.id+'">查看详细</a></td>'+
                          '<td>'+zhaungtai+'</td>'+
                      '</tr>'
              }
              $("#table").append(fenye);
          }
      })
  }
    var idList = new Array();
    function gxShenHe() {
          $.each($(".danXuanKuang"),function (index,item) {
              if($(item).prop("checked") == true){
                      idList.push($(item).val())
                }
          })
      if(idList == 0){
          alert("请勾选操作的用户！")
          return;
      }
      $.ajax({
          url:"/updateAudit",
          data:{"idList":idList},
          dataType:"json",
          type:"post",
          success:function () {
              readList(1);
          }
      })
        alert("审核成功！");
  }

    function gxShenHeNO() {
        var idList = new Array();
        $.each($(".danXuanKuang"),function (index,item) {
            if($(item).prop("checked") == true){
                idList.push($(item).val())
            }
        })
        if(idList == 0){
            alert("请勾选操作的用户！")
            return;
        }
        var notPassCause = prompt("请输入原因:","")
        if(notPassCause == null || notPassCause == ""){
            alert("请输入原因,无法无理由不通过！");
            return;
        }else{
            alert("审核成功！")
        }
        $.ajax({
            url:"/updateAuditNO",
            data:{"idList":idList,"notPassCause":notPassCause},
            dataType:"json",
            type:"post",
            success:function () {
                readList(1);
            }
        })

    }
    function quanxuan() {
        var aa = $("#checkbox1").prop("checked")
        $.each($(".danXuanKuang"),function (index, item) {
            $(item).attr("checked",aa);
            idList.push($(item).val())
        })
    }

    function shuru() {
        var num = prompt("请输入要跳转到第几页：")
        alert(num);
        readList(b.pageNum+=num-=1);
    }

</script>
  <body>

    <div id="base" class="">

      <!-- Unnamed (矩形) -->
      <div id="u2046" class="ax_default box_1">
        <div id="u2046_div" class=""></div>
        <div id="u2046_text" class="text ">
          <p><span>流动人口服务管理系统</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2047" class="ax_default box_3">
        <div id="u2047_div" class=""></div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2048" class="ax_default box_1">
        <div id="u2048_div" class=""></div>
        <div id="u2048_text" class="text ">
          <p><span>注册信息审核</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2049" class="ax_default box_1">
        <div id="u2049_div" class=""></div>
        <div id="u2049_text" class="text ">
          <p><span>流动人口信息管理</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2050" class="ax_default box_1">
        <div id="u2050_div" class=""></div>
        <div id="u2050_text" class="text">
          <p><span>账户管理</span></p>
        </div>
      </div>


      <!-- Unnamed (文本框) -->
      <div id="u2088" class="ax_default text_field">
        <input id="u2088_input" type="text" value="" name="userPhone" placeholder="请输入手机号查询"/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2089" class="ax_default primary_button">
        <div id="u2089_div" class=""></div>
        <div id="u2089_text" class="text " onclick="readList()">
          <p><span>搜索</span></p>
        </div>
      </div>

      <!-- Unnamed (表格) -->
      <table width="60%" border="0" style="margin-left:300px;margin-top:160px;">
        <thead>
        <tr style="height: 50px;">
          <th style="width: 100px"><input type="checkbox" id="checkbox1" class="quanxuan" onclick="quanxuan()">全选</th>
          <th>编号</th>
          <th>手机号</th>
          <th>提交时间</th>
          <th>详情</th>
          <th>审核状态</th>
        </tr>
        </thead>
        <tbody id="table">


        </tbody>
      </table>

      <!-- Unnamed (矩形) -->
      <div id="u2095" class="ax_default button">
        <div  class=""></div>
        <input id="u2095_div" type="button" value="下一页" onclick="readList(b.nextPage)">
        <div id="u2095_text" class="text ">
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2096" class="ax_default box_1">
        <div class=""></div>
        <input id="u2096_div" type="button" value="1" onclick="readList(b.pageNum+=0)">
        <div id="u2096_text" class="text ">
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2097" class="ax_default box_1">
        <div  class=""></div>
        <input id="u2097_div" type="button" value="2" onclick="readList(b.pageNum+=1)">
        <div id="u2097_text" class="text ">
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2098" class="ax_default box_1">
        <div  class=""></div>
        <input id="u2098_div" type="button" value="3" onclick="readList(b.pageNum+=2)">
        <div id="u2098_text" class="text ">
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2099" class="ax_default box_1">
        <div class=""></div>
        <input id=u2099_div type="button" value="4" onclick="readList(b.pageNum+=2)">
        <div id="u2099_text" class="text ">
        </div>
      </div>

    <!--  <!-- Unnamed (矩形) -->
      <div id="u2100" class="ax_default label">
        <div id="u2100_div" class=""></div>
        <input class="u824" name="u824" type="button" onclick="shuru()" value="输入页数" style="height: 30px " >
        <div id="u2100_text" class="text ">
          <p><span>......</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2101" class="ax_default button">
        <div  class=""></div>
        <input id="u2101_div" type="button" value="上一页" onclick="readList(b.prePage)">
        <div id="u2101_text" class="text ">
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2102" class="ax_default button">
        <input id="u2102_div" onclick="gxShenHe()"value="通过审核">
        <div id="u2102_text" class="text ">

        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u2103" class="ax_default button">
        <input id="u2103_div" onclick="gxShenHeNO()" value="不通过">
        <div id="u2103_text" class="text ">
        </div>
</div>

<!-- Unnamed (矩形) -->
<div id="u2104" class="ax_default box_1">
  <div id="u2104_div" class=""></div>
  <div id="u2104_text" class="text ">
    <p><span>流动人口信息统计</span></p>
  </div>
</div>

</div>
</body>
</html>
